package sk.project.accounting.gui;

import java.util.HashSet;
import java.util.List;
import java.util.Set;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;

import sk.project.accounting.data.model.Company;
import sk.project.accounting.data.model.User;
import sk.project.accounting.data.model.User;
import sk.project.accounting.data.services.CompanyService;
import sk.project.accounting.data.services.UserService;

public class TestClass {
	
	@Autowired
	private CompanyService cs;
	@Autowired
	private UserService userService;
	
	
	public void runService(){
	
//		Company company = new Company();
//		company.setDic("mm dic");
//		company.setIcdph("mm icDph");
//		company.setName("mm");
		
//		Set<Company> companies = new HashSet<Company>();
//		companies.add(company);
		
//		User u = new User();
//		u.setName("mm company user");
//		u.setSurname("mm ddd");
//		company.setUser(u);
//		cs.insertCompany(company);
		
//		userService.insertUser(u);
		
//		u.setCompanies(companies);
//		userService.insertUser(u);
		List<User> users = userService.getAllUsers();
		List<Company> companies = cs.getAllCompanies();
		for (Company c : companies) {
			System.out.println(c.toString());
		}	
       
	}

}
